package com.cyj.dream.middleware.blackwhitelist.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cyj.dream.core.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Description: 黑白名单表
 * @BelongsProject: DreamChardonnay
 * @BelongsPackage: com.cyj.dream.middleware.blackwhitelist.entity
 * @Author: ChenYongJia
 * @CreateTime: 2021-09-15 14:03
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "sys_black_white")
@TableName("sys_black_white")
@ApiModel(value = "黑白名单表", description = "sys_black_white 黑白名单表")
public class SysBlackWhite extends BaseEntity {

    @Id
    @TableId(value = "sys_black_white_id", type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(nullable = false, columnDefinition = "bigint(20) unsigned COMMENT '黑白名单表主键--自增'")
    @ApiModelProperty(value = "黑白名单表id", example = "1")
    private Long sysBlackWhiteId;

    @Column(columnDefinition = "bigint(20) COMMENT '黑白名单用户id'")
    @ApiModelProperty(value = "黑白名单用户id", example = "1")
    private Long sysBlackWhiteUserId;

    @Column(columnDefinition = "varchar(128) COMMENT '黑白名单用户昵称'")
    @ApiModelProperty(value = "黑白名单用户昵称")
    private String sysBlackWhiteUserName;

    @Column(columnDefinition = "int(11) COMMENT '黑白名单IPV4地址'")
    @ApiModelProperty(value = "黑白名单IPV4地址", example = "1")
    private Integer sysBlackWhiteIpv4;

    @Column(columnDefinition = "varchar(500) COMMENT '黑白名单IPV6地址'")
    @ApiModelProperty(value = "黑白名单IPV6地址")
    private String sysBlackWhiteIpv6;

    @Column(columnDefinition = "tinyint(3)  COMMENT '黑白名单加入类型（0--暂时加入(黑白名单暂时加入截止时间默认为2小时) 1--永久加入）' default 0")
    @ApiModelProperty(value = "黑白名单加入类型（0--暂时加入(黑白名单暂时加入截止时间默认为2小时) 1--永久加入）", example = "1")
    private Integer sysBlackWhiteJoinType;

    @Column(columnDefinition = "tinyint(3) COMMENT '黑白名单类型（0--白名单 1--黑名单）' default 0 ")
    @ApiModelProperty(value = "黑白名单类型（0--白名单 1--黑名单）", example = "1")
    private Integer sysBlackWhiteType;

    @Column(columnDefinition = "tinyint(3) COMMENT '黑白名单是否删除（0--未删除 1--已删除）' default 0")
    @ApiModelProperty(value = "黑白名单是否删除（0--未删除 1--已删除）", example = "1")
    private Integer delFlag;

}
